package com.zhuangjie.rider.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuangjie.rider.dto.RiderPasswordLoginDTO;
import com.zhuangjie.rider.dto.RiderPhoneCodeLoginDTO;
import com.zhuangjie.rider.dto.RiderSignUpDTO;
import com.zhuangjie.rider.entity.Rider;
import com.zhuangjie.rider.enums.DeliveryOrderState;
import com.zhuangjie.rider.vo.CommonInfosVO;
import com.zhuangjie.rider.pojo.RiderBasicInfo;
import com.zhuangjie.rider.vo.RiderWorkStatisticalDataVO;
import com.zhuangjie.security.entity.AuthenticationTokens;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhuangjie
 * @since 2023-12-26
 */
public interface RiderService extends IService<Rider> {

    void riderRegister(RiderSignUpDTO riderSignUpDTO) throws Exception;

    AuthenticationTokens riderPasswordLogin(RiderPasswordLoginDTO riderPasswordLoginDTO) throws Exception;

    AuthenticationTokens riderPhoneCodeLogin(RiderPhoneCodeLoginDTO riderPhoneCodeLoginDTO) throws Exception;

    RiderBasicInfo getRiderBasicInfo();

    void changeWorkStatus(Short workStatus);

    CommonInfosVO commonInfos() throws ExecutionException, InterruptedException;

    List<Long> filterNotOnlineRider(List<Long> riderIds);

    List<Long> filterUnavailableRiders(List<Long> riderIds, Short online, DeliveryOrderState deliveredToUser);


    RiderWorkStatisticalDataVO riderStatistic();

    AuthenticationTokens refreshToken(String refreshToken) throws Exception;
}
